package org.example.wx_springboot.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.example.wx_springboot.entity.Commodity;
import org.example.wx_springboot.entity.GoodsLists;
import org.example.wx_springboot.mapper.CommodityMapper;
import org.example.wx_springboot.mapper.GoodsListsMapper;
import org.example.wx_springboot.service.IGoodsListsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
@Slf4j
public class GoodsListsService implements IGoodsListsService {

    @Autowired
    GoodsListsMapper goodsListsMapper;

    @Override
    public List<GoodsLists> list() {
//        log.info("CommodityService list");
        return goodsListsMapper.list();
    }

    @Override
    public void save(GoodsLists goodsLists) {
        goodsListsMapper.save(goodsLists);
    }

    @Override
    public void deleteById(Integer id) {
        goodsListsMapper.deleteById(id);
    }

    @Override
    public void update(GoodsLists obj) {
        goodsListsMapper.updateById(obj);
    }
}
